package com.heima.feign.client.fallback;

import com.heima.feign.client.ApArticleClient;
import com.heima.model.acticle.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ApArticleClientFallback implements ApArticleClient {
    @Override
    public ResponseResult save(ArticleDto dto) {
        log.info("走降级逻辑");
        return ResponseResult.errorResult(AppHttpCodeEnum.FEIGN_ARTICLE_FALLBACK);
    }
}
